﻿@model QDT.Core.Members.User
@{
    ViewBag.Title = "用户安全密码设置";
}
<script type="text/javascript" src="@Url.Content("~/Content/Default/JS/jquery.validate.js")"> </script>
<script type="text/javascript" src="@Url.Content("~/Content/Default/JS/messages_zh.js")"> </script>
<script type="text/javascript">
    $().ready(function () {
        $('form').validate({
            rules: {
                SafePassword: {
                    required: true,
                    minlength: 6
                },
                SafeConfirmPassword: {
                    required: true,
                    equalTo: "#SafePassword"
                }
            },
            messages: {
                SafePassword: {
                    required: "<br/>请输入安全密码！",
                    minlength: "<br/>请输入6位以上密码！"
                },
                SafeConfirmPassword: {
                    required: "<br/>请再次安全密码！",
                    equalTo: "<br/>两次密码不相同！"
                }
            }
        });
        $("#Safe_Center").css("background", "#e0524b");
        $("#Safe_Center i,#Safe_Center span").css("color", "white");
        $("#Safe_Center .san-jiaoxing").css("display", "block");
    });
</script>
<style type="text/css">
    .ui-body
    {
        padding: 0;
        background-color: white;
    }
    .ui-grid-20
    {
        width: 778px;
        margin-left: -20px;
    }
</style>
@Html.Action("_UserBanner")
<div class="ui-body">
    <div class="ui-inner">
        <div class="ui-grid-row">
            @Html.Action("UserMenu", new { route = MenuRoute.SafeCenter })
            <div class="ui-grid-20">
                <div class="ui-box">
                    <div class="ui-box-hd">
                        <h1 class="ui-box-title">
                            修改密码</h1>
                    </div>
                    <form class="ui-form" name="" method="post" action="@Url.Action("SafePasswordSetting")">
                    <fieldset>
                        <legend>修改密码</legend>
                        @if (Model.SafePasswordPassed)
                        {
                            <div class="ui-form-item">
                                <label for="" class="ui-label">
                                    <span class="ui-form-required">*</span>原安全密码
                                </label>
                                <input class="ui-input ui-input-large" type="password" id="SafePasswordOld" name="SafePasswordOld" />
                            </div>
                        }
                        <div class="ui-form-item">
                            <label for="" class="ui-label">
                                <span class="ui-form-required">*</span>新安全密码</label>
                            <input class="ui-input ui-input-large" type="password" id="SafePassword" name="SafePassword" />
                        </div>
                        <div class="ui-form-item">
                            <label for="" class="ui-label">
                                <span class="ui-form-required">*</span>确认密码</label>
                            <input class="ui-input ui-input-large" type="password" id="SafeConfirmPassword" name="SafeConfirmPassword" />
                        </div>
                        <div class="ui-form-item">
                            <input type="hidden" name="Id" value="@Model.ID"/>
                            <input type="submit" class="ui-button ui-button-orange big" value="确定" />
                            <a href="@Url.Action("SafeCenter")" class="ui-button ui-button-gray big">返回</a>
                        </div>
                    </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="margin-top: -10px;">@Html.Partial("_BindBottomImage")</div>
